import { View, StyleSheet } from 'react-native'
import React, { useState } from 'react'
import MySwiper from '../components/MySwiper'

export default function Introduction() {
  const [swiperImgs, setSwiperImgs] = useState([
    { id: 1, img: require('../assets/img/cat.jpg') },
    { id: 2, img: require('../assets/img/cat2.jpg') },
    { id: 3, img: require('../assets/img/cat3.jpg') },
    { id: 4, img: require('../assets/img/cat4.jpg') },
  ])
  return (
    <View style={styles.container}>
      <MySwiper images={swiperImgs}></MySwiper>
    </View>
  )
}

// 组件的options，配置状态栏，topBar，bottomTab的属性配置：
// 如果是class组件，可以是组件的一个私有属性：static options ;
Introduction.options = {
  topBar: {
    visible: false
  },
  statusBar: {
    visible: false
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'orange'
  }
})